package com.ujson.chat.client;

import com.ujson.chat.client.controller.CommandController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication(scanBasePackages = "com.ujson")
public class ChatClientApplication implements CommandLineRunner {
    @Autowired
    CommandController commandController;

    public static void main(String[] args) {
        SpringApplication.run(ChatClientApplication.class, args);
    }

    public void run(String... args) throws Exception {
        commandController.startThread();
    }
}
